package org.example.threadlocal;

/**
 * @author LanWP
 * @date 2024-08-02
 */
public class UserContext {
    private static ThreadLocal<UserContextInfo> userContextInfoThreadLocal = new ThreadLocal<>();

    public static UserContextInfo getUserContext() {
        return userContextInfoThreadLocal.get();
    }

    public static void setUserContext(UserContextInfo userContext) {
        userContextInfoThreadLocal.set(userContext);
    }
}
